<?php
/*
 * Created on Sep 13, 2007
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
require('./View/Security.php');
require('./Model/SpecalizedInserts.php');
require('./Controller/HelperCheck.php');
$caneLink = "AdminEditBox.php";
 if(isset($_POST['updateUser'])) {
 
	unset($_POST['updateUser']);
	unset($_POST['table']);
	editUser($_POST);
}
 if($_POST['AddBox'] != "") {
 	
 	unset($_POST['AddBox']);
 	addBox($_POST);
 }
 
require('./Controller/UpdateBackEnd.php');

if($_POST['change'] == "Update") {
	unset($_POST['change']);
	addTubes($_POST);
}
if($_POST['clear'] != "") {
	unset($_POST['clear']);
	$_POST['CellTypeID'] = getEmptyCellType();
	$_POST['ModifiedByID'] =getEmptyMod();
	$_POST['FrozenByID'] = getEmptyResearcher();
	$_POST['FrozenDate'] = "";
	$_POST['Note'] = "";
	$_POST['PassageFrozen'] = "";
	$_POST['NumberFrozen'] = "";
	addTubes($_POST);
}


?>

<HTML>
<HEAD>
</HEAD>
<BODY>
Choose a item to edit
<?php if(!($_POST['addCellType'] != "" | $_POST['addMod'] != "" | $_POST['addResearcher'] != "")): ?>
<form name="input" action="AdminAddorEdit.php" method="get">
	<select name="edit">
		<option value="CellType">Add or Edit Cell Types</option>
		<option value="Modification">Add or Edit Modifications </option>
		<option value="Researcher">Add or Edit Researchers </option>
		<option value="ContainerType">Add or Edit Container Types </option>
		<option value="Container">Add or Edit Containers</option>
		<?php if(isAdmin()): ?>
		<option value="Users">Add or Edit Users of the Database</option>
		<?php endif; ?>
	</select>
	<input type="submit" value="Add or Edit Selected Table">
</form>
<?php if(isAdmin()): ?>
	<a href='AdminControls.php'>Backup Database</a>
	<a href='Merge.php'>Merge Items</a>
<?php endif; ?>
</br>	
</br>
 <?php require('./View/CaneView.php');	?>	
<?php endif; ?>
<?php makeBackButton() ?>
<?php require('./View/Footer.php'); ?>
</BODY>
</HTML>
